#ifndef UI_PATTERNBOX_H
#define UI_PATTERNBOX_H

#include <qcombobox.h>

#include "lx_define.h"
#include "pf_pattern.h"
#include "pf_patternlist.h"
#include "gui_export.h"

/**
 * A combobox for choosing a pattern name.
 */
class GUI_EXPORT UI_PatternBox: public QComboBox {
    Q_OBJECT

public:
    UI_PatternBox(QWidget* parent=0, const char* name=0);
    virtual ~UI_PatternBox();

    PF_Pattern* getPattern() {
        return currentPattern;
    }
    void setPattern(const QString& pName);

    void init();

private slots:
    void slotPatternChanged(int index);

signals:
    void patternChanged(PF_Pattern* pattern);

private:
    PF_Pattern* currentPattern;
};

#endif

